package com.sherllinhe.business.controller;

import com.sherllinhe.business.req.DailyTrainTicketQueryReq;
import com.sherllinhe.business.req.DailyTrainTicketSaveReq;
import com.sherllinhe.business.resp.DailyTrainTicketQueryResp;
import com.sherllinhe.business.service.DailyTrainTicketService;
import com.sherllinhe.common.resp.CommonResp;
import com.sherllinhe.common.resp.PageResp;
import jakarta.validation.Valid;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 功能：
 * 作者：Sherllin He
 * 日期：
 */
@RequestMapping("/daily-train-ticket")
@RestController
public class DailyTrainTicketController {
    @Autowired
    private DailyTrainTicketService dailyTrainTicketService;

    @GetMapping("/query-list")
    public CommonResp<PageResp<DailyTrainTicketQueryResp>> register(@Valid DailyTrainTicketQueryReq req){
        PageResp<DailyTrainTicketQueryResp> list = dailyTrainTicketService.queryList(req);
        return new CommonResp<>(list);
    }

}
